<template>
  <div>
<ul class="ul">
<li v-for="(item,index) in this.$store.state.res" :key="item.id" v-show="item.num==1">
   <div >
        <span>{{item.content}}</span>
    <span>
        <van-button color="blue" style="height:30px;width:100px;" @click="twoUp1(index)">标为未读</van-button>
        <van-button color="red" style="height:30px;width:60px;margin-left:10px;" @click="twoUp2(index)">删除</van-button>
        </span>
   </div>
</li>
<van-button @click="all">全部选择</van-button>

</ul>
  </div>
</template>

<script>
export default {
  data () {
    return {
      msg: ''
    }
  },
  methods: {
      twoUp1(index){
          this.$store.commit('twoUp1',index)
      },
        twoUp2(index){
          this.$store.commit('twoUp2',index)
      },
        all(){
          this.$store.commit('all2')
      }
  }
}
</script>

<style lang='scss'>
.ul>li{
    width: 100%;
    height: 50px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    padding: 0 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.ul div{
    overflow: hidden;
    width: 100%;
    display: flex;
    justify-content: space-between;
}
</style>
